﻿using log4net;
using log4net.Config;
using System;

namespace BaseUtils.Logger
{
    public class LoggerServer
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(LoggerServer));

        public static void Initialize()
        {
            XmlConfigurator.Configure(new System.IO.FileInfo("log4net.config"));
        }

        public static void LogInfo(string message)
        {
            log.Info(message);
        }

        public static void LogWarning(string message)
        {
            log.Warn(message);
        }

        public static void LogError(string message)
        {
            log.Error(message);
        }

        public static void LogError(string message, Exception ex)
        {
            log.Error(message, ex);
        }
    }
}
